<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<s:i18n name="person">
<html>
  <head>  
    
    <title></title>
    
		<link href="<s:url value="../css/work.css"/>" rel="stylesheet"
			type="text/css" />

   
    <script language="javascript" type="text/javascript">
     function check(){
    	var oldPassword=document.getElementById('oldPassword');
    	var password=document.getElementById('password');
    	var confirmPassword=document.getElementById('confirmPassword');
    	if(oldPassword.value.trim()==""){
			alert("<s:text name='oldPass.required' />");
			oldPassword.focus();
			return false;
        	}
    	if(password.value.trim()==""){
			alert("<s:text name='Password.required'/>");
			password.focus();
			return false;
        	}
    	if(password.value.trim()!=confirmPassword.value.trim()){
			alert("<s:text name='validation.confirmPassword.required'/>");
			confirmPassword.focus();
			return false;
        	}
    	return true;
         }
     //删除左右两端的空格
		function trim(str){return str.replace(/(^\s*)|(\s*$)/g, "");}
		String.prototype.trim = function(){
     return  this.replace(/(^\s*)|(\s*$)/g, "");
		}
		function back()
		{
		   window.location="../../usermanager/initAdminForShowAction.action";	     
		}	
	 </script>
   
  </head>
  
  <body onload="javascript:form1.oldPassword.focus();">
  
    <s:form namespace="/admin" action="doPasswordModificationAction" theme="simple" method="post" name="form1" >
   

  
     
     <h1><s:text name="Password.Modification"/></h1>
        
        <table class="tableForm">
        
            <tr class="mainHeader">
                <td colspan="2"><s:text name="Login.Information"/></td>
            </tr>           
            
            
            <tr>
                <td style="width: 20%; padding-left:20px;"><label ><s:text name="user.loginname"/></label></td>
                <td> <s:property value="loginName"/></td>
            </tr> 
                    
            <tr>
                <td style="width: 20%; padding-left:20px;"><label><s:text name="Old.Password"></s:text></label></td>
                <td><s:password name="oldPassword" id="oldPassword"></s:password>  </td>
            </tr>  
                    
                                   
            <tr>
                <td style="width: 20%; padding-left:20px;"><label><s:text name="New.Password"/></label></td>
                <td><s:password name="password" id="password" ></s:password>  </td>
            </tr>  
            
            <tr>
                <td style="width: 20%; padding-left:20px;"><label ><s:text name="submit.confirmation"></s:text></label></td>
                <td><s:password name="confirmPassword" id="confirmPassword"></s:password></td>
            </tr>           
           
                       

            <tr>
            <td colspan="2" class="submitRow">
            
            <s:submit key="submit.submit" onclick="return check();return false;" ></s:submit> &nbsp;&nbsp;
            <s:reset key="submit.reset"></s:reset>   &nbsp;&nbsp;
            
            
            
            
                </td>
            </tr>
            
       </table>
     
     
     </s:form>


  </body>
</html>
</s:i18n>